﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AHMHRIRSF05.aspx.cs" Inherits="apps_ahmic_pages_AHMHRIRSF01" %>
<div class="form-outer">
<div class="form-header" id="formHeader" runat="server">
</div>
<div class="sub-pages" id="formContentOuter" runat="server">
    <div class="sub-page sub-page-default" data-section="list" data-path="Master>Daftar Karyawan">
        <div class="form-maincontent form-block grid">
            <div class="row">
                <div class="filter-panel" >
                    <div class="input-control text" data-role="input-control">
		                <input name="filter_nrp" id="filter_nrp" runat="server" type="text" placeholder="Ketik NRP/Nama/Bagian" />
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
                    <div class="input-control select" data-role="input-control">
                        <select name="filter_area" id="filter_area" runat="server">
                        </select>
	                </div>
                    <button class="button medium default" id="ahmhrirsf05_btnFilterDefault" onclick="_fw_table_filter(this,$('#ahmhrirsf05_list'))"><i class="icon-filter on-left"></i>Filter Data</button>
                </div>
            </div>
            <div id="ahmhrirsf05_list" class="listContainer" runat="server">
            
            </div>
        </div>
    </div>
    <div class="sub-page" data-section="mapping" data-path="Master>Daftar Karyawan>Field Mapping">
        <div class="form-maincontent form-block grid">
            <div class="row">
                <div class="span6">
	                <label>Kolom NRP</label>
	                <div class="input-control select">
		                <select name="vcol1"></select>
	                </div>	
	                <label>Kolom Nama</label>
	                <div class="input-control select">
		                <select name="vcol2"></select>
	                </div>	
	                <label>Kolom Golongan</label>
	                <div class="input-control select">
		                <select name="vcol3"></select>
	                </div>	
	                <label>Kolom Area</label>
	                <div class="input-control select">
		                <select name="vcol4"></select>
	                </div>	
	                <label>Kolom Direktorat</label>
	                <div class="input-control select">
		                <select name="vcol5"></select>
	                </div>	
                </div>
                <div class="span6">
	                <label>Kolom Divisi</label>
	                <div class="input-control select">
		                <select name="vcol6"></select>
	                </div>	
	                <label>Kolom Departemen</label>
	                <div class="input-control select">
		                <select name="vcol7"></select>
	                </div>	
	                <label>Kolom Sub Departemen</label>
	                <div class="input-control select">
		                <select name="vcol8"></select>
	                </div>	
	                <label>Kolom Section</label>
	                <div class="input-control select">
		                <select name="vcol9"></select>
	                </div>	
                </div>
            </div>
        </div>
        <div class="main-form-toolbar-bottom">
            <input type="hidden" name="fid" />
            <input type="hidden" name="action" value="process" />
            <button type="button" class="medium primary" >
	            <span class="icon-floppy"></span>
                Process Data
            </button>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        $('#ahmhrirsf05_btnFilterDefault').click();
    });
    function ahmhrirsf05_uploadFile(obj) {
        _fw_openUploadForm(obj, '', 1, 'file-excel', function (data) {
            var fobj = $('.sub-page[data-section="mapping"]');
            /* Set uploaded file id */
            $('input[name="fid"]', fobj).val(data.id);

            /* Set option values */
            var opts = '<option value=""> - Pilih kolom yang bersesuaian - </option>';
            for (var d = 0; d < data.data.length; d++) {
                opts += '<option value="' + (d+1) + '">' + data.data[d] + '</option>';
            }
            $('select', fobj).empty().append($(opts));

            /* Set default values */
            $('select[name="vcol1"] option:nth(1)').prop('selected', true);
            $('select[name="vcol2"] option:nth(2)').prop('selected', true);
            $('select[name="vcol3"] option:nth(12)').prop('selected', true);
            $('select[name="vcol4"] option:nth(10)').prop('selected', true);
            $('select[name="vcol5"] option:nth(9)').prop('selected', true);
            $('select[name="vcol6"] option:nth(8)').prop('selected', true);
            $('select[name="vcol7"] option:nth(7)').prop('selected', true);
            $('select[name="vcol8"] option:nth(6)').prop('selected', true);
            $('select[name="vcol9"] option:nth(5)').prop('selected', true);

            _fw_navigateSubPage(obj, 'mapping');
        });
    }
    function ahmhrirsf05_add(obj) {

    }
    function ahmhrirsf05_edit(obj) {

    }
    function ahmhrirsf05_delete(obj) {

    }
</script>